package threePart.stringHandle;

public class six {
    public static void main(String[] args) {
        // 创建一个空的StringBuilder对象
        StringBuilder str = new StringBuilder();

        // 追加字符串
        str.append("jaewkjldfxmopzdm");

        int remainder = str.length() % 3;
        // 从后往前每隔三位插入逗号
        for (int index = remainder; index < str.length(); index += 4) {
            str.insert(index, ',');
        }

        // 将StringBuilder对象转换为String对象并输出
        System.out.print(str.toString());
    }
}
